<template>
  <div>
    <!-- 左侧三级联动 -->
    <type-nav></type-nav>
    <!-- 右侧列表和轮播图 -->
    <ListContainer></ListContainer>
    <!-- 今日推荐 -->
    <Recommend></Recommend>
    <!-- 商品排行 -->
    <Rank></Rank>
    <!-- 猜你喜欢 -->
    <Like></Like>
    <!-- 家用电器--- 后期渲染 -->
    <Floor v-for="floorList in floorList" :key="floorList.id" :List="floorList"></Floor>
    <!-- 商标 -->
    <Brand></Brand>
  </div>
</template>

<script>
import ListContainer from '@/pages/Home/listContainer'
import Recommend from '@/pages/Home/recommend'
import Rank from '@/pages/Home/rank'
import Like from '@/pages/Home/like'
import Floor from '@/pages/Home/floor'
import Brand from '@/pages/Home/brand'
import { mapState } from 'vuex'
export default {
  components: {
    ListContainer,
    Recommend,
    Rank,
    Like,
    Floor,
    Brand
  },
  mounted() {
    this.$store.dispatch('getFloorList')
  },
  computed: {
    ...mapState({
      floorList: (state) => state.home.floorList
    })
  }
}
</script>

<style></style>
